function KKB.Panel_Weapons( Panel )
	Panel_Weapons = Panel
	Panel_Weapons:SetSize(100, 400)
	Panel_Weapons:Clear(true)
	Panel_Weapons.contents = vgui.Create("DListLayout")
	Panel_Weapons.contents:Clear()
	
	KKB.Weapons_GroupList = vgui.Create( "DListView" )
	KKB.Weapons_GroupList:AddColumn( "User Group" )
	KKB.Weapons_GroupList:SetTall( 150 )
	KKB.Weapons_GroupList:SetMultiSelect( true )
	function KKB.Weapons_Reload_GroupList()
		KKB.Weapons_GroupList:Clear()
		for k,_ in pairs(KKB.UserGroups) do
			KKB.Weapons_GroupList:AddLine(k)
		end
	end
	KKB.Weapons_Reload_GroupList()
	Panel_Weapons:AddPanel(KKB.Weapons_GroupList)
	
	local AddGroupButton = vgui.Create( "DButton" )
	AddGroupButton:SetText( "Add Group(s) To Selected Weapon" )
	AddGroupButton.DoClick = function( button )
		local TreeItem = Panel_Weapons.WeaponTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local SelectedLines = KKB.Weapons_GroupList:GetSelected()
			if ( #SelectedLines > 0 ) then
				local Weapon = TreeItem:GetText()
				local Groups = {}
				for _,v in pairs(SelectedLines) do
					local Group = v.Columns[1]:GetValue()
					if ( KKB.WeaponRestrictions[Weapon] == nil or not table.HasValue(KKB.WeaponRestrictions[Weapon].Groups, Group) ) then
						table.insert(Groups, Group)
					end
				end
				if ( #Groups > 0 ) then
					net.Start( "KKB_Weapon_Add" )
					net.WriteTable( Groups )
					net.WriteString( Weapon )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Weapons:AddPanel(AddGroupButton)
	
	Panel_Weapons.WeaponTree = vgui.Create( "DTree" )
	Panel_Weapons.WeaponTree:SetPadding( 5 )
	Panel_Weapons.WeaponTree:SetTall( 400 )
	local WeaponName = nil
	local Categorys = {}
	for _,v in pairs(weapons.GetList()) do
		if ( v.Spawnable == true ) then
			local Category = v.Category or "Other"
			if ( Categorys[Category] == nil ) then
				local Group = Panel_Weapons.WeaponTree:AddNode( Category )
				Group.DoClick = function( Item )
					Item:SetSelected( false )
				end
				Categorys[Category] = Group
			end
			local Weapon = Categorys[Category]:AddNode( v.ClassName )
			Weapon.DoClick = function( Item )
				Panel_Weapons.AllowedGroupList:Clear()
				WeaponName = Item:GetText()
				if ( KKB.WeaponRestrictions[WeaponName] != nil ) then
					Panel_Weapons.PhysgunCheck:SetValue(KKB.WeaponRestrictions[WeaponName].Options.Physgun)
					Panel_Weapons.ToolgunCheck:SetValue(KKB.WeaponRestrictions[WeaponName].Options.Toolgun)
					Panel_Weapons.GravcannonCheck:SetValue(KKB.WeaponRestrictions[WeaponName].Options.Gravcannon)
					Panel_Weapons.UseCheck:SetValue(KKB.WeaponRestrictions[WeaponName].Options.Use)
					Panel_Weapons.DamageCheck:SetValue(KKB.WeaponRestrictions[WeaponName].Options.Damage)
					Panel_Weapons.AllowedGroupList:Clear()
					for _,v in pairs(KKB.WeaponRestrictions[WeaponName].Groups) do
						Panel_Weapons.AllowedGroupList:AddLine(v)
					end
				end
			end
		end
	end
	Panel_Weapons:AddPanel(Panel_Weapons.WeaponTree)
	
	Panel_Weapons.AllowedGroupList = vgui.Create( "DListView" )
	Panel_Weapons.AllowedGroupList:AddColumn( "Allowed User Group" )
	Panel_Weapons.AllowedGroupList:SetTall( 150 )
	Panel_Weapons.AllowedGroupList:SetMultiSelect( true )
	function KKB.Weapons_Reload_AllowedGroups()
		Panel_Weapons.AllowedGroupList:Clear()
		if ( WeaponName != nil ) then
			for _,v in pairs(KKB.WeaponRestrictions[WeaponName].Groups) do
				Panel_Weapons.AllowedGroupList:AddLine(v)
			end
		end
	end
	Panel_Weapons:AddPanel(Panel_Weapons.AllowedGroupList)
	
	local RemoveGroupButton = vgui.Create( "DButton" )
	RemoveGroupButton:SetText( "Remove Group(s) From Selected Weapon" )
	RemoveGroupButton.DoClick = function( button )
		local TreeItem = Panel_Weapons.WeaponTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local SelectedLines = KKB.Weapons_GroupList:GetSelected()
			if ( #SelectedLines > 0 ) then
				local Weapon = TreeItem:GetText()
				local Groups = {}
				for _,v in pairs(SelectedLines) do
					local Group = v.Columns[1]:GetValue()
					if ( KKB.WeaponRestrictions[Weapon] != nil and table.HasValue(KKB.WeaponRestrictions[Weapon].Groups, Group) ) then
						table.insert(Groups, Group)
					end
				end
				if ( #Groups > 0 ) then
					net.Start( "KKB_Weapon_Delete" )
					net.WriteTable( Groups )
					net.WriteString( Weapon )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Weapons:AddPanel(RemoveGroupButton)
	
	Panel_Weapons.BlacklistCheck = vgui.Create("DCheckBoxLabel")
	Panel_Weapons.BlacklistCheck:SetText("Blacklist?")
	Panel_Weapons.BlacklistCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Weapons.BlacklistCheck:SetValue(KKB.Settings.Weapons.Blacklist)
	Panel_Weapons.BlacklistCheck.OnChange = function( _, fVal )
		if ( KKB.Settings.Weapons.Blacklist != fVal ) then
			net.Start( "KKB_Settings_Update" )
			net.WriteString( "Weapons" )
			net.WriteString( "Blacklist" )
			net.WriteUInt( KKB.BoolToInt(fVal), 32 )
			net.SendToServer()
		end
	end
	Panel_Weapons:AddPanel(Panel_Weapons.BlacklistCheck)
	Panel_Weapons:AddControl("Label", {Text = ""})
	
	Panel_Weapons.PhysgunCheck = vgui.Create("DCheckBoxLabel")
	Panel_Weapons.PhysgunCheck:SetText("Physgun")
	Panel_Weapons.PhysgunCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Weapons.PhysgunCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Weapons.WeaponTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Weapon = TreeItem:GetText()
			if ( KKB.WeaponRestrictions[Weapon] != nil ) then
				if ( KKB.WeaponRestrictions[Weapon].Options.Physgun != fVal ) then
					net.Start( "KKB_Weapon_Update" )
					net.WriteString( Weapon )
					net.WriteString( "Physgun" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Weapons:AddControl("Label", {Text = "Determines What Can Interact With This Weapon"})
	Panel_Weapons:AddPanel(Panel_Weapons.PhysgunCheck)
	
	Panel_Weapons.ToolgunCheck = vgui.Create("DCheckBoxLabel")
	Panel_Weapons.ToolgunCheck:SetText("Toolgun")
	Panel_Weapons.ToolgunCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Weapons.ToolgunCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Weapons.WeaponTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Weapon = TreeItem:GetText()
			if ( KKB.WeaponRestrictions[Weapon] != nil ) then
				if ( KKB.WeaponRestrictions[Weapon].Options.Toolgun != fVal ) then
					net.Start( "KKB_Weapon_Update" )
					net.WriteString( Weapon )
					net.WriteString( "Toolgun" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Weapons:AddPanel(Panel_Weapons.ToolgunCheck)
	
	Panel_Weapons.GravcannonCheck = vgui.Create("DCheckBoxLabel")
	Panel_Weapons.GravcannonCheck:SetText("Gravcannon")
	Panel_Weapons.GravcannonCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Weapons.GravcannonCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Weapons.WeaponTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Weapon = TreeItem:GetText()
			if ( KKB.WeaponRestrictions[Weapon] != nil ) then
				if ( KKB.WeaponRestrictions[Weapon].Options.Gravcannon != fVal ) then
					net.Start( "KKB_Weapon_Update" )
					net.WriteString( Weapon )
					net.WriteString( "Gravcannon" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Weapons:AddPanel(Panel_Weapons.GravcannonCheck)
	
	Panel_Weapons.UseCheck = vgui.Create("DCheckBoxLabel")
	Panel_Weapons.UseCheck:SetText("Use")
	Panel_Weapons.UseCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Weapons.UseCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Weapons.WeaponTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Weapon = TreeItem:GetText()
			if ( KKB.WeaponRestrictions[Weapon] != nil ) then
				if ( KKB.WeaponRestrictions[Weapon].Options.Use != fVal ) then
					net.Start( "KKB_Weapon_Update" )
					net.WriteString( Weapon )
					net.WriteString( "Use" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Weapons:AddPanel(Panel_Weapons.UseCheck)
	
	Panel_Weapons.DamageCheck = vgui.Create("DCheckBoxLabel")
	Panel_Weapons.DamageCheck:SetText("Damage")
	Panel_Weapons.DamageCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Weapons.DamageCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Weapons.WeaponTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Weapon = TreeItem:GetText()
			if ( KKB.WeaponRestrictions[Weapon] != nil ) then
				if ( KKB.WeaponRestrictions[Weapon].Options.Damage != fVal ) then
					net.Start( "KKB_Weapon_Update" )
					net.WriteString( Weapon )
					net.WriteString( "Damage" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Weapons:AddPanel(Panel_Weapons.DamageCheck)
end